<template>
		<view class="goods_list">
			<view class="goods_item" v-for="item in goods" :key="item.id">
				<image :src="item.imgUrl"></image>
					<view class="price">
						<text>${{item.marketPrice}}</text>
						<text>${{item.sellPrice}}</text>
					</view>
		    <view class="name">{{item.title}} </view>
			</view>
			
		</view>
</template>

<script>
	
	export default {
		props:['goods'],
	
		data() {
			return {
				
			}
		}
		
	}
</script>

<style lang="scss">
	.goods_list{
		display: flex;  //商品横着
		padding: 0 15rpx;
		flex-wrap: wrap;  //商品换行
		justify-content: space-between;  //商品之间的间距
		.goods_item{
			background: #fff;
			width: 355rpx;
			margin: 10rpx 0rpx;
			padding: 15rpx;
			box-sizing: border-box; //盒子不被撑大
			image{
				display: block;
				margin: auto;
				width: 80%;
				height:150px;
				
			}
		}
		.price{
			color: $shop-color;
			font-size: 36rpx;
			margin: 20rpx 0 5rpx 0;
			text:nth-child(2){   //自定义
				color: #ccc;
				font-size: 28rpx;  
				margin-left: 17rpx;
				text-decoration: line-through; //设置金额波浪线
			}
		}
		.name{
			font-size: 28rpx;
			line-height: 50rpx;
			padding-bottom: 15rpx;
			padding-top: 10rpx;
		}
	}
</style>
